Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(platform): Clickable Workspaces #630

Merged
merged 2 commits into from
Jan 14, 2025

Conversation

mrswastik-robot
Copy link
Contributor

@mrswastik-robot mrswastik-robot commented Jan 13, 2025

User description

Description

The workspace were not switchable using the mouse pointer, this PR removes the class that was causing the issue and now mouse pointer can be used to switch between workspaces by clicking on them.

Fixes #620

Screenshots of relevant screens

Before:

Screenshot from 2025-01-14 02-25-29

After:

Screenshot from 2025-01-14 02-27-27

Developer's checklist

  • My PR follows the style guidelines of this project
  • I have performed a self-check on my work

If changes are made in the code:

  • I have followed the coding guidelines
  • My changes in code generate no new warnings
  • My changes are breaking another fix/feature of the project
  • I have added test cases to show that my feature works
  • I have added relevant screenshots in my PR
  • There are no UI/UX issues

Documentation Update

  • This PR requires an update to the documentation at docs.keyshade.xyz
  • I have made the necessary updates to the documentation, or no documentation changes are required.

PR Type

Bug fix


Description

  • Fixed workspace selection issue by updating CSS class.

  • Changed cursor-default to cursor-pointer for clickable items.

  • Resolved inability to switch workspaces via mouse clicks.


Changes walkthrough 📝

Relevant files
Bug fix
command.tsx
Update CSS class for workspace item interactivity               

apps/platform/src/components/ui/command.tsx

  • Replaced cursor-default with cursor-pointer for better interactivity.
  • Adjusted CSS class to ensure workspaces are selectable via mouse
    clicks.
  • +1/-1     

    💡 PR-Agent usage: Comment /help "your question" on any pull request to receive relevant information

    Copy link
    Contributor

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    🎫 Ticket compliance analysis ✅

    620 - PR Code Verified

    Compliant requirements:

    • Fix inability to select/switch between workspaces using mouse clicks
    • UI should visually indicate workspace selection capability

    Requires further human verification:

    • Maintain existing workspace switching functionality - need to verify that keyboard navigation and other workspace switching methods still work
    ⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ Recommended focus areas for review

    Accessibility Impact

    Removal of 'data-[disabled]:pointer-events-none' may affect disabled items behavior. Verify that disabled items are still properly handled.

    'relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-white/20 aria-selected:text-white data-[disabled]:opacity-50 dark:aria-selected:bg-zinc-800 dark:aria-selected:text-zinc-50',

    Copy link
    Contributor

    codiumai-pr-agent-free bot commented Jan 13, 2025

    PR Code Suggestions ✨

    Explore these optional code suggestions:

    CategorySuggestion                                                                                                                                    Score
    Possible issue
    ✅ Prevent user interaction with disabled elements to maintain proper component behavior

    Retain the data-[disabled]:pointer-events-none class to prevent interaction with
    disabled items. Without it, disabled items remain clickable despite their visual
    state.

    apps/platform/src/components/ui/command.tsx [122]

    -'relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-white/20 aria-selected:text-white data-[disabled]:opacity-50 dark:aria-selected:bg-zinc-800 dark:aria-selected:text-zinc-50'
    +'relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-white/20 aria-selected:text-white data-[disabled]:pointer-events-none data-[disabled]:opacity-50 dark:aria-selected:bg-zinc-800 dark:aria-selected:text-zinc-50'

    [Suggestion has been applied]

    Suggestion importance[1-10]: 9

    Why: The suggestion correctly identifies a significant accessibility and UX issue where the PR accidentally removed the pointer-events-none class, which could lead to confusing behavior where visually disabled items remain interactive.

    9

    @rajdip-b rajdip-b merged commit acc96f7 into keyshade-xyz:develop Jan 14, 2025
    4 checks passed
    @mrswastik-robot mrswastik-robot deleted the select-workspace-issue branch January 16, 2025 13:32
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    PLATFORM: Can't select any workspaces
    2 participants